import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
export default new Vuex.Store({
  state: {
    // dropBall: []
  },
  actions: {
    drop (el, s) {
     // console.info(s)
     // console.info(this.state.balls)
      for (let i = 0; i < this.state.balls.length; i++) {
        let ball = this.state.balls[i]
        if (!ball.show) {
          ball.show = true
          ball.el = s
          this.state.dropBalls.push(ball)
          return
        }
      }
    }
  }
})
